package com.xin.springclouduser.service;

import com.xin.springclouduser.dataobject.User;
import com.xin.springclouduser.dto.PageResult;
import com.xin.springclouduser.dto.UserDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface UserService {
    //创建用户
    UserDTO create(UserDTO userDTO);
    //修改用户
    UserDTO update(UserDTO userDTO);
    //删除用户(通过userId)
    boolean delete(String uid);
    //查询一个用户(通过userId)
    UserDTO findOneByUserId(String userId);
    //查询一个用户(通过openId)
    UserDTO findOneByOpenId(String openId);
    //查询全部用户
    PageResult<User> findAll(Pageable pageable);
}
